{extend name="public:layout" /}
{block name="title"}添加行业{/block}
{block name="head"}
{:widget('common/Form/validRes')}
{/block}
{block name="body"}
<div class="wrapper wrapper-content animated fadeInRight">
    <div class="ibox">
        <div class="ibox-title">
            <ol class="breadcrumb">
                <li><i class="fa fa-hand-o-right"></i> <a href="{:url('index')}"> 行业列表</a></li>
                <li class="active">添加行业</li>
            </ol>
        </div>
        <div class="ibox-content">
            <form method="post" class="form-horizontal" id="form">
                <div class="form-group">
                    <label class="col-sm-2 control-label Validform_label">上级行业</label>
                    <div class="col-sm-4">
                        <select name="trade_pid" class="form-control">
                            <option value="0">顶级行业</option>
                            {volist name="tradeList" id="vo"}
                            <option value="{$vo.trade_id}"
                                    {eq name="vo.trade_id" value="$Request.param.trade_pid"}selected{/eq}
                            >{$vo._name}</option>
                            {/volist}
                        </select>
                    </div>
                </div>

                <div class="form-group">
                    <label class="col-sm-2 control-label Validform_label">行业名称</label>
                    <div class="col-sm-4">
                        <input type="text" class="form-control" placeholder="请输入行业名称"
                               name="trade_name" value="" datatype="*"/>
                    </div>
                </div>
                <div class="form-group">
                    <label class="col-sm-2 control-label Validform_label">行业名称首字母</label>
                    <div class="col-sm-4">
                        <input type="text" class="form-control" placeholder="请输入行业名称首字母"
                               name="trade_name_first" value="" datatype="*"/>
                    </div>
                </div>
                <div class="form-group">
                    <label class="col-sm-2 control-label Validform_label">行业排序</label>
                    <div class="col-sm-4">
                        <input type="text" class="form-control"
                               name="trade_sort" value="0" datatype="n" />
                    </div>
                </div>
                <div class="form-group">
                    <div class="col-sm-10 col-sm-offset-2">
                        <button class="btn btn-primary"
                                onclick="ajaxSubForm();" type="submit">
                            保存内容
                        </button>
                        <a href="{:url('index')}" class="btn btn-white">取消</a>
                        <span id="validError"></span>
                    </div>
                </div>
            </form>
        </div>
    </div>
</div>
{/block}
{block name="script"}
<script type="text/javascript">
    $(function () {
        iCheck();
    })
</script>
{/block}